package com.shijiu.controller;

import com.shijiu.dao.mapper.TestMapper;
import com.shijiu.common.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @Author xlj
 * @Date Created in  2023/3/18 14:30
 * @DESCRIPTION:
 * @Version V1.0
 */
@Controller
@RestController
@RequestMapping("test")
public class TestController {

    @Autowired
    private TestMapper testMapper;

    @PostMapping("/test1")
    public Result testGet(@RequestBody String name){
        System.out.println(name);
        return Result.success(name);
    }
    @PostMapping(value = "/test2",produces = "application/json; charset=utf-8")
    public Result testGet2(@RequestBody String name){
        System.out.println(name);
        return Result.success(name);
    }
}
